home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
500 MB Nyheder Direkte fra Internet 9
/
500 MB nyheder direkte fra internet CD 9.iso
/
start
/
zipped
/
win
/
visbasic
/
playwavz.exe
/
FORM1.FRM
< prev
next >
Wrap
Text File
|
1995-12-02
|
3KB
|
123 lines
VERSION 2.00
Begin Form SimpleWAV
Caption = "Simple WAV Player"
ClientHeight = 1860
ClientLeft = 1995
ClientTop = 2625
ClientWidth = 5145
Height = 2550
Left = 1935
LinkTopic = "Form1"
ScaleHeight = 1860
ScaleWidth = 5145
Top = 1995
Width = 5265
Begin CommandButton Command1
Caption = "Play"
Enabled = 0 'False
Height = 495
Left = 1320
TabIndex = 0
Top = 960
Width = 2655
End
Begin CommonDialog CMDialog1
DialogTitle = "Open / Play Wave File"
Filter = "WAV Files | *.wav"
Left = 120
Top = 1080
End
Begin Label lblFilename
Caption = "No File Loaded"
FontBold = -1 'True
FontItalic = -1 'True
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 120
TabIndex = 1
Top = 360
Width = 4935
End
Begin Label Label3
Caption = "Current File"
Height = 255
Left = 120
TabIndex = 2
Top = 120
Width = 2655
End
Begin Menu File
Caption = "File"
Begin Menu FileOpen
Caption = "&Open"
Shortcut = ^O
End
Begin Menu separator
Caption = "-"
End
Begin Menu Exit
Caption = "E&xit"
Shortcut = ^X
End
End
Begin Menu Help
Caption = "Help"
Begin Menu Aboutmnu
Caption = "About"
End
End
End
Sub About_Click ()
End Sub
Sub Aboutmnu_Click ()
about.Show 1
End Sub
Sub Command1_Click ()
wFlags% = SND_LOOP And SND_ASYNC
Command1.Enabled = False
X% = sndPlaySound(lblFileName.Caption, wFlags%)
Command1.Enabled = True
End Sub
Sub Exit_Click ()
End
End Sub
Sub FileOpen_Click ()
'Call common dialog
CMDialog1.Filename = ""
CMDialog1.Action = DLG_FILE_OPEN
'Put the file name on the form
lblFileName.Caption = CMDialog1.Filename
'Turn off the Italics
lblFileName.FontItalic = False
'Enable the Play command button
Command1.Enabled = True
'Disable the Play command button if there is no file
If lblFileName.Caption = "" Then
Command1.Enabled = False
lblFileName.Caption = "No File Loaded"
lblFileName.FontItalic = True
End If
End Sub
Sub Form_Load ()
CenterForm SimpleWAV
End Sub